package com.hpeng.gl.dao.impl;

import org.springframework.stereotype.Component;
import com.hpeng.gl.dao.StaffDao;
import com.hpeng.sys.model.Staff;
import com.hpeng.util.GenericDaoImpl;
import com.hpeng.util.Pagination;


@Component("staffDao")
public class StaffDaoImpl extends GenericDaoImpl<Staff, String> implements
		StaffDao {

	public Pagination<Staff> getPagination(int pageNumber,
			String[] hql,String[] values, String order) {
		Pagination<Staff> pagination = null;
		StringBuffer sb = new StringBuffer();
		try {
			for(String str:hql){
				sb.append(str);
			}
			pagination = getPagination(sb.toString()+order, values, pageNumber);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return pagination;
	}

	

}
